<extend name='Public/admin/content' />

<block name="button">
  <div class="nowrap pull-right" style="margin-top:10px">
    <button data-update data-field='delete' data-action='{:url("$classuri/del")}' class='layui-btn layui-btn-sm layui-btn-danger'>
      <i class='fa fa-remove'></i> 删除用户
    </button>
  </div>
</block>


<block name="content">
  <!-- 表单搜索 开始 -->
  <form class="layui-form layui-form-pane form-search" action="__SELF__" onsubmit="return false" method="get">
    <div class="layui-form-item layui-inline">
      <label class="layui-form-label">真实姓名</label>
      <div class="layui-input-inline">
        <input name="name" value="{$Think.get.name|default=''}" placeholder="请输入真实姓名" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item layui-inline">
      <label class="layui-form-label">护照号</label>
      <div class="layui-input-inline">
        <input name="passport" value="{$Think.get.passport|default=''}" placeholder="请输入护照号" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item layui-inline">
      <label class="layui-form-label">学号</label>
      <div class="layui-input-inline">
        <input name="number" value="{$Think.get.number|default=''}" placeholder="请输入学号" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item layui-inline">
      <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>

  </form>
  <!-- 表单搜索 结束 -->
  <form onsubmit="return false;" data-auto="true" method="post">
    <if condition="empty($list)">
      <p class="help-block text-center well">没 有 记 录 哦！</p>
      <else/>
      <input type="hidden" value="resort" name="action"/>
      <table class="layui-table" lay-skin="line" lay-size="sm">
        <thead>
        <tr>
          <th class='list-table-check-td'>
            <input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
          </th>
          <th class='text-left nowrap'>真实姓名</th>
          <th class='text-left nowrap'>性别</th>
          <th class='text-left nowrap'>护照</th>
          <th class='text-left nowrap'>学院</th>
          <th class='text-left nowrap'>专业</th>
          <th class='text-left nowrap'>国家</th>
          <th class='text-left nowrap'>状态</th>
          <th class='text-left nowrap'>操作</th>
        </tr>
        </thead>
        <tbody>

        <foreach name="list" item="vo">

          <tr>
            <td class='list-table-check-td'>
              <input class="list-check-box" value='{$vo.id}' type='checkbox'/>
            </td>
            <td class='text-left nowrap'>
              <empty name="$vo.name">
                {$vo.first_name}
                <else />
                {$vo.name}
              </empty>
            </td>
            <td class='text-left nowrap'>
              {$vo.sex|default="<span class='color-desc'>还没有设置性别</span>"}
            </td>
            <td class='text-left nowrap'>
              {$vo.passport|default="<span class='color-desc'>还没有设置护照</span>"}
            </td>
            <td class='text-left nowrap'>
              {$vo.college|default="<span class='color-desc'>还没有设置学院</span>"}
            </td>
            <td class='text-left nowrap'>
              {$vo.profession|default="<span class='color-desc'>还没有设置专业</span>"}
            </td>
            <td class='text-left nowrap'>
              {$vo.country|default="<span class='color-desc'>还没有设置国家</span>"}
            </td>
            </td>
            <td class='text-left nowrap'>
              <if condition="$vo.status eq 0"><span>正常</span> <elseif condition="$vo.status eq 1"/> <span style="color:#090">异常</span> </if>
            </td>
            <td class='text-left nowrap'>
              <if condition='auth("$classuri/edit")'>
                <span class="text-explode">|</span>
                <a data-modal='{:url("edit")}?id={$vo.id}' href="javascript:void(0)">编辑</a>
              </if>
              <!--<if condition='auth("$classuri/del")'>-->
                <!--<span class="text-explode">|</span>-->
                <!--<a data-update="{$vo.id}" data-field='delete' data-action='{:url("$classuri/del")}'-->
                   <!--href="javascript:void(0)">删除</a>-->
              <!--</if>-->
            </td>
          </tr>
        </foreach>
        </tbody>
      </table>
      <if condition=" isset($page_content)"><p>{$page_content}</p></if>
    </if>
    <script>
      window.laydate.render({range: true, elem: '#range-date', format: 'yyyy/MM/dd'});
    </script>
  </form>

</block>